include <BOSL2/std.scad>
/*[精细度]*/
$fn=100;
/*[罐子尺寸]*/
bot_radius=35.5;
bot_height=52;
/*[壁厚和圆角半径]*/
shell_width=2;
round_radius=1;

difference(){
    union(){
        difference(){
            minkowski(){
                cylinder(r=bot_radius+shell_width,h=bot_height);
                sphere(round_radius);
            }
            translate([0,0,-round_radius]) cylinder(r=bot_radius*2/3,h=shell_width+round_radius);
            translate([0,0.4*bot_radius,bot_height/2])cube([2*(bot_radius+shell_width+round_radius),1.6*bot_radius,bot_height/2],center=true);
        }

        translate([0,-bot_radius,bot_height/6])rotate([90,0,-90])
        cup_handle(w=bot_radius,h=bot_height*5/6,r=shell_width*2);
      }
      //最后镗平内壁
    translate([0,0,shell_width-round_radius])cylinder(r=bot_radius,h=bot_height);
}
module cup_handle(w=60,h=90,r=2){
    ctrl_points = [[0, 0],  [w*0.6, h*0.4], [w*0.8,h*0.9],[0,h*0.8]];
    path_sweep(circle(r), bezpath_curve(ctrl_points,splinesteps=64));
}